//
//  Resource.m
//  HDTianjinNature
//
//  Created by Liuzhuan on 13-12-4.
//  Copyright (c) 2013年 hengdawb. All rights reserved.
//

#import "Resource.h"


@implementation Resource

- (id)init
{
    self = [super init];
    if (self)
    {}
    return self;
}

- (void)initTemporaryWithDic:(NSDictionary *)myDic
{
    self.FileNo     = myDic[@"fileno"];
    self.FileName   = myDic[@"filename"];
    self.FileType   = myDic[@"filetype"];
    self.ByName     = myDic[@"byname"];
    self.UnitType   = myDic[@"temporary_id"];
    self.Distance   = myDic[@"distance"];
    self.SubName    = myDic[@"subname"];
    self.IsFastRoad = myDic[@"isfastroad"];
    self.PhotoNum   = myDic[@"photonum"];
    self.IsRead     = myDic[@"isread"];
    self.RSSI       = myDic[@"rssi"];
    self.Floor      = myDic[@"floor"];
    self.X          = myDic[@"x"];
    self.Y          = myDic[@"y"];
    self.Neighbor   = myDic[@"neighbor"];
    
    NSString *autoNum = myDic[@"autonum"];
    self.AutoNum   = autoNum.integerValue;
    
    if ([self.ByName isKindOfClass:[NSNull class]] || [self.ByName isEqualToString:@"<null>"])
        self.ByName = nil;
    if ([self.FileName isKindOfClass:[NSNull class]] || [self.FileName isEqualToString:@"<null>"])
        self.FileName = nil;
}

- (void)dealloc
{
    self.FileNo     = nil;
    self.FileName   = nil;
    self.FileType   = nil;
    self.ByName     = nil;
    self.UnitType   = nil;
    self.Distance   = nil;
    self.SubName    = nil;
    self.IsFastRoad = nil;
    self.PhotoNum   = nil;
    self.IsRead     = nil;
    self.RSSI       = nil;
    self.Floor      = nil;
    self.X          = nil;
    self.Y          = nil;
    self.Neighbor   = nil;
    self.checkMD5   = nil;
}

@end
